package GuiUtils;

import java.awt.Color;
import java.awt.Dimension;

import javax.swing.JEditorPane;
import javax.swing.JLabel;
import javax.swing.JPanel;
import javax.swing.JScrollPane;
import javax.swing.JTextArea;
import javax.swing.JTextField;
import javax.swing.JTextPane;
import javax.swing.text.EditorKit;
import javax.swing.text.JTextComponent;

import net.miginfocom.swing.MigLayout;

public class SingleTextArea extends JPanel {
    
    public JLabel label;
    public JEditorPane field;
    
    public SingleTextArea(String labelText) {
       // setLayout(new MigLayout());
        label = new JLabel(labelText);
        this.setSize(new Dimension(200, 100));
        this.setPreferredSize(getSize());
        this.setMaximumSize(getSize());
        this.setMinimumSize(getSize());
        
        field = new JEditorPane();
        
        JScrollPane scroll = new JScrollPane(field);
        scroll.setPreferredSize(new Dimension(200, 100));
        scroll.add(field);
        field.setPreferredSize(new Dimension(200, 100));
        field.setSize(new Dimension(200, 100));
        field.setMaximumSize(getSize());
        field.setMinimumSize(getSize());
        field.setAutoscrolls(true);
       // field.setBackground(new Color(255,255,255));
        add(label);
        add(field);
    }
}
